import { IPSChartCoordinateSystemParallel } from './ipschart-coordinate-system-parallel';
import { IPSChartParallel } from './ipschart-parallel';
import { PSDEChartCoordinateSystemImplBase } from './psdechart-coordinate-system-impl-base';

export class PSDEChartCoordinateSystemParallelImpl extends PSDEChartCoordinateSystemImplBase implements IPSChartCoordinateSystemParallel {
  protected pschartparallel: IPSChartParallel | null = null;

  getPSChartParallel(): IPSChartParallel | null {
    if (this.pschartparallel != null) return this.pschartparallel;
    const value = this.M.getPSChartParallel;
    if (value == null) {
      return null;
    }
    this.pschartparallel = this.getPSModel4('control.chart.IPSChartParallel', value, 'getPSChartParallel') as IPSChartParallel;
    return this.pschartparallel;
  }

  get psChartParallel(): IPSChartParallel | null {
    return this.getPSChartParallel();
  }

  getPSChartParallelMust(): IPSChartParallel {
    const value = this.getPSChartParallel();
    if (value == null) {
      throw new Error('未指定平行坐标系界面对象');
    }
    return value;
  }

  get cls(): string {
    return 'PSDEChartCoordinateSystemParallelImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'control.chart.IPSChartCoordinateSystemParallel') return true;
    return super.instanceof(cls);
  }
}
